package com.ybox.common.core.constant;



/**
 * @author ych
 */
public class FilterOrderConstant {
    private static int order;

    public static void setOrder(Integer value){
        order = value;
    }
    public static Integer getOrder(String name) {
        switch (name) {
            case "com.ybox.common.security.feign.FeignRequestInterceptor":
                setOrder(-6);
                break;
            case "com.ybox.common.security.aspect.InnerAuthAspect":
                setOrder(-5);
                break;
            case "com.ybox.gateway.filter.ApiRequestFilter":
                setOrder(-4);
                break;
            case "com.ybox.gateway.filter.ApiVerifyFilter":
                setOrder(-3);
                break;
            case "com.ybox.gateway.filter.XssFilter":
                setOrder(-2);
                break;
            case "com.ybox.gateway.filter.AuthFilter":
                setOrder(-1);
                break;
            default:
                setOrder(1);
                break;
        }
        return order;
    }
}
